package com.star.spring.aop.controller;

import com.star.spring.aop.service.AnnotationTestService;
import com.star.spring.aop.service.AopTestService;
import com.star.spring.aop.service.InvocationTestService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ClassName TestController
 * @Author star
 * @Date 2024/10/18 11:11
 */
@RestController
public class TestController {

    @Autowired
    private InvocationTestService invocationTestService;

    @Autowired
    private AopTestService aopTestService;

    @Autowired
    private AnnotationTestService annotationTestService;




    @GetMapping("/test/invocation")
    public Integer testInvocation() {
        Integer result = invocationTestService.testAdd();
        return result;
    }

    @GetMapping("/test/aop")
    public Integer testAop() {
        Integer result = aopTestService.testAdd();
        return result;
    }

    @GetMapping("/test/annotation")
    public Integer testAnnotation() {
        Integer result = annotationTestService.testAdd();
        return result;
    }

}
